An input device, such as a touch sensor or a keyboard, may include a sensor matrix having a switch for each sensor. In one example, a keyboard may include keys and a sensor matrix with a first set of conductors arranged in rows and a second set of conductors arranged in columns. Each key may include a switch connecting one row and one column when the key is pressed. The pressed key may be identified by scanning the column conductors and sensing the row conductors with a scanning sensing circuit.